/**
 * 
 */
package com.guoxin.prototype;


/**
 * @author guoxin
 * @date 2019年8月16日
 */
public class Client {
	public static void main(String[] args) throws CloneNotSupportedException {
		Sheep sheep = new Sheep();
		sheep.setAge(10);
		sheep.setName("doli");
		sheep.setColor("white");
		
		Sheep friend = new Sheep();
		friend.setAge(10);
		friend.setName("tom");
		friend.setColor("black");
		sheep.setFriend(friend);
		
		Sheep clone = (Sheep) sheep.clone();
		clone.setName("doli2");
		clone.getFriend().setName("tom2");
		System.out.println(sheep);
		System.out.println(clone);
		
	}
}
